<template>
  <div class="cardlist">
      <Headers title="接个招-我的卡券"/>
      <div class="box">
          <div class="item">
              <div class="left">
                  <div class="img"></div>
              </div>
              <div class="right">
                  <div class="title">
                    <span class="brand">必胜客</span>
                    <span class="use" >未使用
                    </span>
                    </div>
                  <div class="name">幸福晚餐新品尝鲜酸辣鸡买一送一</div>
                  <div class="time">有效期 2021-6-1 至 2021-6-30</div>
              </div>
          </div>
          <div class="item" :class="{overdue:true}">
              <div class="left">
                  <div class="img"></div>
              </div>
              <div class="right">
                  <div class="title">
                    <span class="brand">必胜客</span>
                    <span class="use" >已过期
                    </span>
                    </div>
                  <div class="name">幸福晚餐新品尝鲜酸辣鸡买一送一</div>
                  <div class="time">有效期 2021-6-1 至 2021-6-30</div>
              </div>
          </div>
          <div class="item">
              <div class="left">
                  <div class="img"></div>
              </div>
              <div class="right">
                  <div class="title">
                    <span class="brand">必胜客</span>
                    <span class="use" >未使用
                    </span>
                    </div>
                  <div class="name">幸福晚餐新品尝鲜酸辣鸡买一送一</div>
                  <div class="time">有效期 2021-6-1 至 2021-6-30</div>
              </div>
          </div>
          <div class="item">
              <div class="left">
                  <div class="img"></div>
              </div>
              <div class="right">
                  <div class="title">
                    <span class="brand">必胜客</span>
                    <span class="use" >未使用
                    </span>
                    </div>
                  <div class="name">幸福晚餐新品尝鲜酸辣鸡买一送一</div>
                  <div class="time">有效期 2021-6-1 至 2021-6-30</div>
              </div>
          </div>
          <div class="item">
              <div class="left">
                  <div class="img"></div>
              </div>
              <div class="right">
                  <div class="title">
                    <span class="brand">必胜客</span>
                    <span class="use" >未使用
                    </span>
                    </div>
                  <div class="name">幸福晚餐新品尝鲜酸辣鸡买一送一</div>
                  <div class="time">有效期 2021-6-1 至 2021-6-30</div>
              </div>
          </div>
      </div>
  </div>
</template>

<script>
// import { Button  } from "vant";
import  Headers  from "@/components/header";

export default {
    components:{
       Headers
    }
}
</script>

<style lang="less" scoped>
.box {
    height: calc(100vh - 44px) ;
    overflow: auto;
    background-color: #12151A;
    overflow: auto;
    .item{
        position: relative;
        display: flex;
        width: 343px;
        height: 112px;
        margin: 0 auto;
        margin-top: 16px;
        background-color: #fff;
        border-radius: 10px;
        overflow: hidden;
        .left{
            width: 94px;
            height: 112px;
            background-color: #fff;
            .img{
                width: 100%;
                height: 100%;
                background-color: #000;
                z-index: 100;
            }
        }
        .right{
            margin-left: 16px;
            padding: 22px 0 23px 0;
            display: flex;
            flex-direction: column;
            justify-content: space-around;
            text-align: left;
            .title{
                font-size: 16px;
                font-weight: bold;
                color: #333333;
                line-height: 20px;
                display: flex;
                align-items: center;
                margin-bottom: 7px;
                .brand{
                    font-size: 16px;
                    font-weight: bold;
                    color: #333333;
                    margin-right: 6px;
                }
                .use{
                padding: 2px 4px;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 9px;
                line-height: 13px;
                font-weight: bold;
                color: #FFFFFF;
                text-align: center;
                background-image: linear-gradient(to right, #FFAD8B , #FF87AF);
                border-radius: 100px;
            }
            }
            .name{
                font-size: 12px;
                font-weight: 500;
                color: #666666;
                margin-bottom: 4px;
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
            }
            .time{
                font-size: 12px;
                font-weight: 500;
                color: #FFAD8B;
            }
        }
        // 黑点模拟
    &::before {
        content: '';
        position: absolute;
        width: 22px;
        height: 22px;
        background-color: #12151A;
        border-radius: 100px;
        left: -11px;
        top: 0;
        bottom: 0;
        margin: auto;
    }
    &::after {
        content: '';
        position: absolute;
        width: 22px;
        height: 22px;
        background-color: #12151A;
        border-radius: 100px;
        right: -11px;
        top: 0;
        bottom: 0;
        margin: auto;
    }
    }
    // 过期样式和已使用
    .overdue{
        .right{
            .title{
                .use{
                    background-image: linear-gradient(to right, #ccc , #ccc);
                }
            }
            .time{
                color: #666666;
            }
        }
    }
}
</style>